package com.stnet.bases;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.stnet.service.enterprice.base.EpColumnManagerDao;
import com.stnet.service.enterprice.base.StandbyManagerDao;
import com.stnet.service.enterprice.chinamobile.DirectorderManagerDao;
import com.stnet.service.enterprice.chinamobile.OnlineRechargeManagerDao;
import com.stnet.service.enterprice.chinamobile.ProductManagerDao;
import com.stnet.service.enterprice.chinamobile.SaleorderManagerDao;
import com.stnet.service.enterprice.chinamobile.TransferManagerDao;
import com.stnet.service.enterprice.collection.EpNewsManagerDao;
import com.stnet.service.enterprice.dynamic.EpAdManagerDao;
import com.stnet.service.enterprice.dynamic.EpBulletinManagerDao;
import com.stnet.service.enterprice.dynamic.EpLinksManagerDao;
import com.stnet.service.enterprice.style.WebSkinColorManagerDao;
import com.stnet.service.enterprice.style.WebSkinManagerDao;
import com.stnet.service.enterprice.system.AuthoritiesManagerDao;
import com.stnet.service.enterprice.system.RolesAuthoritiesManagerDao;
import com.stnet.service.enterprice.system.RolesManagerDao;
import com.stnet.service.enterprice.system.UsersManagerDao;
import com.stnet.service.enterprice.system.UsersRolesManagerDao;
import com.stnet.service.enterprice.system.WebSiteManagerDao;

public class BaseAction extends ActionSupport {
	
	/**
	 * 是否显示提示与错误信息
	 */
	protected boolean showMesscat = false;
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	protected UsersManagerDao usersManagerDao;
	protected RolesManagerDao rolesManagerDao;
	protected UsersRolesManagerDao usersRolesManagerDao;
	protected AuthoritiesManagerDao authoritiesManagerDao;
	protected RolesAuthoritiesManagerDao rolesAuthoritiesManagerDao;
	protected EpColumnManagerDao epColumnManagerDao;
	protected EpNewsManagerDao epNewsManagerDao;
	protected EpAdManagerDao epAdManagerDao;
	protected EpLinksManagerDao epLinksManagerDao;
	protected EpBulletinManagerDao epBulletinManagerDao;
	protected WebSiteManagerDao webSiteManagerDao;
	protected WebSkinManagerDao webSkinManagerDao;
	protected WebSkinColorManagerDao webSkinColorManagerDao;
	
	/**
	 * 二次开发
	 * */
	protected DirectorderManagerDao directorderManagerDao;
	protected SaleorderManagerDao saleorderManagerDao;
	protected TransferManagerDao transferManagerDao;
	protected ProductManagerDao productManagerDao;
	protected OnlineRechargeManagerDao onlineRechargeManagerDao;
	protected StandbyManagerDao standbyManagerDao;
	
	

	public WebSkinColorManagerDao getWebSkinColorManagerDao() {
		return webSkinColorManagerDao;
	}

	public void setWebSkinColorManagerDao(
			WebSkinColorManagerDao webSkinColorManagerDao) {
		this.webSkinColorManagerDao = webSkinColorManagerDao;
	}

	public WebSkinManagerDao getWebSkinManagerDao() {
		return webSkinManagerDao;
	}

	public void setWebSkinManagerDao(WebSkinManagerDao webSkinManagerDao) {
		this.webSkinManagerDao = webSkinManagerDao;
	}

	public BaseAction() {
	}

	protected String renderText(String text) {
		return render(text, "text/plain;charset=UTF-8");
	}

	protected String render(String text, String contentType) {
		try {
			HttpServletResponse response = ServletActionContext.getResponse();
			response.setContentType(contentType);
			response.getWriter().write(text);
		} catch (IOException ioexception) {
		}
		return null;
	}

	public WebSiteManagerDao getWebSiteManagerDao() {
		return webSiteManagerDao;
	}

	public void setWebSiteManagerDao(WebSiteManagerDao webSiteManagerDao) {
		this.webSiteManagerDao = webSiteManagerDao;
	}

	public EpNewsManagerDao getEpNewsManagerDao() {
		return epNewsManagerDao;
	}

	public void setEpNewsManagerDao(EpNewsManagerDao epNewsManagerDao) {
		this.epNewsManagerDao = epNewsManagerDao;
	}

	public EpColumnManagerDao getEpColumnManagerDao() {
		return epColumnManagerDao;
	}

	public void setEpColumnManagerDao(EpColumnManagerDao epColumnManagerDao) {
		this.epColumnManagerDao = epColumnManagerDao;
	}

	public EpAdManagerDao getEpAdManagerDao() {
		return epAdManagerDao;
	}

	public void setEpAdManagerDao(EpAdManagerDao epAdManagerDao) {
		this.epAdManagerDao = epAdManagerDao;
	}

	public EpLinksManagerDao getEpLinksManagerDao() {
		return epLinksManagerDao;
	}

	public void setEpLinksManagerDao(EpLinksManagerDao epLinksManagerDao) {
		this.epLinksManagerDao = epLinksManagerDao;
	}

	public EpBulletinManagerDao getEpBulletinManagerDao() {
		return epBulletinManagerDao;
	}

	public void setEpBulletinManagerDao(
			EpBulletinManagerDao epBulletinManagerDao) {
		this.epBulletinManagerDao = epBulletinManagerDao;
	}

	public UsersManagerDao getUsersManagerDao() {
		return usersManagerDao;
	}

	public void setUsersManagerDao(UsersManagerDao usersManagerDao) {
		this.usersManagerDao = usersManagerDao;
	}

	public RolesManagerDao getRolesManagerDao() {
		return rolesManagerDao;
	}

	public void setRolesManagerDao(RolesManagerDao rolesManagerDao) {
		this.rolesManagerDao = rolesManagerDao;
	}

	public UsersRolesManagerDao getUsersRolesManagerDao() {
		return usersRolesManagerDao;
	}

	public void setUsersRolesManagerDao(
			UsersRolesManagerDao usersRolesManagerDao) {
		this.usersRolesManagerDao = usersRolesManagerDao;
	}

	public AuthoritiesManagerDao getAuthoritiesManagerDao() {
		return authoritiesManagerDao;
	}

	public void setAuthoritiesManagerDao(
			AuthoritiesManagerDao authoritiesManagerDao) {
		this.authoritiesManagerDao = authoritiesManagerDao;
	}

	public RolesAuthoritiesManagerDao getRolesAuthoritiesManagerDao() {
		return rolesAuthoritiesManagerDao;
	}

	public void setRolesAuthoritiesManagerDao(
			RolesAuthoritiesManagerDao rolesAuthoritiesManagerDao) {
		this.rolesAuthoritiesManagerDao = rolesAuthoritiesManagerDao;
	}

	public DirectorderManagerDao getDirectorderManagerDao() {
		return this.directorderManagerDao;
	}

	public void setDirectorderManagerDao(DirectorderManagerDao directorderManagerDao) {
		this.directorderManagerDao = directorderManagerDao;
	}

	public SaleorderManagerDao getSaleorderManagerDao() {
		return this.saleorderManagerDao;
	}

	public void setSaleorderManagerDao(SaleorderManagerDao saleorderManagerDao) {
		this.saleorderManagerDao = saleorderManagerDao;
	}

	public TransferManagerDao getTransferManagerDao() {
		return this.transferManagerDao;
	}

	public void setTransferManagerDao(TransferManagerDao transferManagerDao) {
		this.transferManagerDao = transferManagerDao;
	}

	public boolean isShowMesscat() {
		return this.showMesscat;
	}

	public void setShowMesscat(boolean showMesscat) {
		this.showMesscat = showMesscat;
	}

	public ProductManagerDao getProductManagerDao() {
		return productManagerDao;
	}

	public void setProductManagerDao(ProductManagerDao productManagerDao) {
		this.productManagerDao = productManagerDao;
	}

	public OnlineRechargeManagerDao getOnlineRechargeManagerDao() {
		return onlineRechargeManagerDao;
	}

	public void setOnlineRechargeManagerDao(
			OnlineRechargeManagerDao onlineRechargeManagerDao) {
		this.onlineRechargeManagerDao = onlineRechargeManagerDao;
	}

	public StandbyManagerDao getStandbyManagerDao() {
		return standbyManagerDao;
	}

	public void setStandbyManagerDao(StandbyManagerDao standbyManagerDao) {
		this.standbyManagerDao = standbyManagerDao;
	}
	

}